<div class="box box-solid box-primary">
    <div class="box-header with-border">
        <h3 class="box-title">{{modal.header}}</h3>
    </div>
    <!-- /.box-header -->
    <!-- form start -->
    <form class="form-horizontal" name="taskForm">
        <div class="box-body">
            <div class="form-group has-feedback" ng-class="{'has-success' : !taskForm.baseTaskType.$pristine && taskForm.baseTaskType.$valid,
            'has-error' : !taskForm.baseTaskType.$pristine && taskForm.baseTaskType.$invalid}">
                <label for="baseTaskType" class="col-sm-4 control-label">任务名称</label>

                <div class="col-sm-8">
                    <input type="text" class="form-control" required ng-maxlength=40 ng-minlength=2 ng-pattern="/^[a-zA-Z|0-9]*$/"
                           ng-model="modal.baseTaskType" name="baseTaskType"
                           id="baseTaskType" placeholder="任务名称">

                    <div ng-show="!taskForm.baseTaskType.$pristine && taskForm.baseTaskType.$valid">
                        <span class="glyphicon glyphicon-ok form-control-feedback"></span><label class="control-label">验证通过</label>
                    </div>
                    <div ng-show="!taskForm.baseTaskType.$pristine && taskForm.baseTaskType.$invalid">
                        <span class="glyphicon glyphicon-remove form-control-feedback"></span><label class="control-label">任务名称必须大于2位并小于40位因为字符串</label>
                    </div>
                </div>
            </div>

            <div class="form-group has-feedback" ng-class="{'has-success' : !taskForm.dealBeanName.$pristine && taskForm.dealBeanName.$valid,
            'has-error' : !taskForm.dealBeanName.$pristine && taskForm.dealBeanName.$invalid}">
                <label for="dealBeanName" class="col-sm-4 control-label">任务处理的SpringBean</label>

                <div class="col-sm-8">
                    <input type="text" class="form-control" required ng-maxlength=40 ng-minlength=2 ng-pattern="/^[a-zA-Z|0-9]*$/"
                           ng-model="modal.dealBeanName" name="dealBeanName"
                           id="dealBeanName" placeholder="任务处理的SpringBean">

                    <div ng-show="!taskForm.dealBeanName.$pristine && taskForm.dealBeanName.$valid">
                        <span class="glyphicon glyphicon-ok form-control-feedback"></span><label class="control-label">验证通过</label>
                    </div>
                    <div ng-show="!taskForm.dealBeanName.$pristine && taskForm.dealBeanName.$invalid">
                        <span class="glyphicon glyphicon-remove form-control-feedback"></span><label class="control-label">任务处理的SpringBen必须大于2位并小于40位因为字符串</label>
                    </div>
                </div>
            </div>

            <div class="form-group has-feedback" ng-class="{'has-success' : !taskForm.heartBeatRate.$pristine && taskForm.heartBeatRate.$valid,
            'has-error' : !taskForm.heartBeatRate.$pristine && taskForm.heartBeatRate.$invalid}">
                <label for="heartBeatRate" class="col-sm-4 control-label">心跳频率</label>

                <div class="col-sm-8">
                    <input type="number" class="form-control" required ng-maxlength=40
                           ng-model="modal.heartBeatRate" name="heartBeatRate"
                           id="heartBeatRate" placeholder="心跳频率">

                    <div ng-show="!taskForm.heartBeatRate.$pristine && taskForm.heartBeatRate.$valid">
                        <span class="glyphicon glyphicon-ok form-control-feedback"></span><label class="control-label">验证通过</label>
                    </div>
                    <div ng-show="!taskForm.heartBeatRate.$pristine && taskForm.heartBeatRate.$invalid">
                        <span class="glyphicon glyphicon-remove form-control-feedback"></span><label class="control-label">心跳频率必须是数字</label>
                    </div>
                </div>
            </div>
            <div class="form-group has-feedback" ng-class="{'has-success' : !taskForm.judgeDeadInterval.$pristine && taskForm.judgeDeadInterval.$valid,
            'has-error' : !taskForm.judgeDeadInterval.$pristine && taskForm.judgeDeadInterval.$invalid}">
                <label for="judgeDeadInterval" class="col-sm-4 control-label">死亡间隔</label>

                <div class="col-sm-8">
                    <input type="number" class="form-control" required ng-maxlength=40
                           ng-model="modal.judgeDeadInterval" name="judgeDeadInterval"
                           id="judgeDeadInterval" placeholder="死亡间隔">

                    <div ng-show="!taskForm.judgeDeadInterval.$pristine && taskForm.judgeDeadInterval.$valid">
                        <span class="glyphicon glyphicon-ok form-control-feedback"></span><label class="control-label">验证通过</label>
                    </div>
                    <div ng-show="!taskForm.judgeDeadInterval.$pristine && taskForm.judgeDeadInterval.$invalid">
                        <span class="glyphicon glyphicon-remove form-control-feedback"></span><label class="control-label">死亡间隔必须是数字</label>
                    </div>
                </div>
            </div>

            <div class="form-group has-feedback" ng-class="{'has-success' : !taskForm.threadNumber.$pristine && taskForm.threadNumber.$valid,
            'has-error' : !taskForm.threadNumber.$pristine && taskForm.threadNumber.$invalid}">
                <label for="threadNumber" class="col-sm-4 control-label">线程数</label>

                <div class="col-sm-8">
                    <input type="number" class="form-control" required ng-maxlength=40
                           ng-model="modal.threadNumber" name="threadNumber"
                           id="threadNumber" placeholder="线程数">

                    <div ng-show="!taskForm.threadNumber.$pristine && taskForm.threadNumber.$valid">
                        <span class="glyphicon glyphicon-ok form-control-feedback"></span><label class="control-label">验证通过</label>
                    </div>
                    <div ng-show="!taskForm.threadNumber.$pristine && taskForm.threadNumber.$invalid">
                        <span class="glyphicon glyphicon-remove form-control-feedback"></span><label class="control-label">线程数必须是数字</label>
                    </div>
                </div>
            </div>

            <div class="form-group">
                <label for="processorType" class="col-sm-4 control-label">处理模式</label>

                <div class="col-sm-8">
                    <select class="form-control" name="processorType" id="processorType" ng-model="modal.processorType"
                            ng-options="x for x in modal.typeList">
                    </select>
                </div>
            </div>

            <div class="form-group has-feedback" ng-class="{'has-success' : !taskForm.fetchDataNumber.$pristine && taskForm.fetchDataNumber.$valid,
            'has-error' : !taskForm.fetchDataNumber.$pristine && taskForm.fetchDataNumber.$invalid}">
                <label for="fetchDataNumber" class="col-sm-4 control-label">每次获取数量</label>

                <div class="col-sm-8">
                    <input type="number" class="form-control" required ng-maxlength=40
                           ng-model="modal.fetchDataNumber" name="fetchDataNumber"
                           id="fetchDataNumber" placeholder="每次获取数量">

                    <div ng-show="!taskForm.fetchDataNumber.$pristine && taskForm.fetchDataNumber.$valid">
                        <span class="glyphicon glyphicon-ok form-control-feedback"></span><label class="control-label">验证通过</label>
                    </div>
                    <div ng-show="!taskForm.fetchDataNumber.$pristine && taskForm.fetchDataNumber.$invalid">
                        <span class="glyphicon glyphicon-remove form-control-feedback"></span><label class="control-label">每次获取数量必须是数字</label>
                    </div>
                </div>
            </div>

            <div class="form-group has-feedback" ng-class="{'has-success' : !taskForm.executeNumber.$pristine && taskForm.executeNumber.$valid,
            'has-error' : !taskForm.executeNumber.$pristine && taskForm.executeNumber.$invalid}">
                <label for="executeNumber" class="col-sm-4 control-label">每次执行数量</label>

                <div class="col-sm-8">
                    <input type="number" class="form-control" required ng-maxlength=40
                           ng-model="modal.executeNumber" name="executeNumber"
                           id="executeNumber" placeholder="每次执行数量">

                    <div ng-show="!taskForm.executeNumber.$pristine && taskForm.executeNumber.$valid">
                        <span class="glyphicon glyphicon-ok form-control-feedback"></span><label class="control-label">验证通过</label>
                    </div>
                    <div ng-show="!taskForm.executeNumber.$pristine && taskForm.executeNumber.$invalid">
                        <span class="glyphicon glyphicon-remove form-control-feedback"></span><label class="control-label">每次执行数量必须是数字</label>
                    </div>
                </div>
            </div>

            <div class="form-group has-feedback" ng-class="{'has-success' : !taskForm.sleepTimeNoData.$pristine && taskForm.sleepTimeNoData.$valid,
            'has-error' : !taskForm.sleepTimeNoData.$pristine && taskForm.sleepTimeNoData.$invalid}">
                <label for="sleepTimeNoData" class="col-sm-4 control-label">没有数据休眠时长</label>

                <div class="col-sm-8">
                    <input type="number" class="form-control" required ng-maxlength=40
                           ng-model="modal.sleepTimeNoData" name="sleepTimeNoData"
                           id="sleepTimeNoData" placeholder="没有数据休眠时长">

                    <div ng-show="!taskForm.sleepTimeNoData.$pristine && taskForm.sleepTimeNoData.$valid">
                        <span class="glyphicon glyphicon-ok form-control-feedback"></span><label class="control-label">验证通过</label>
                    </div>
                    <div ng-show="!taskForm.sleepTimeNoData.$pristine && taskForm.sleepTimeNoData.$invalid">
                        <span class="glyphicon glyphicon-remove form-control-feedback"></span><label class="control-label">没有数据休眠时长必须是数字</label>
                    </div>
                </div>
            </div>

            <div class="form-group has-feedback" ng-class="{'has-success' : !taskForm.sleepTimeInterval.$pristine && taskForm.sleepTimeInterval.$valid,
            'has-error' : !taskForm.sleepTimeInterval.$pristine && taskForm.sleepTimeInterval.$invalid}">
                <label for="sleepTimeInterval" class="col-sm-4 control-label">每次处理完休眠时长</label>

                <div class="col-sm-8">
                    <input type="number" class="form-control" required ng-maxlength=40
                           ng-model="modal.sleepTimeInterval" name="sleepTimeInterval"
                           id="sleepTimeInterval" placeholder="每次处理完休眠时长">

                    <div ng-show="!taskForm.sleepTimeInterval.$pristine && taskForm.sleepTimeInterval.$valid">
                        <span class="glyphicon glyphicon-ok form-control-feedback"></span><label class="control-label">验证通过</label>
                    </div>
                    <div ng-show="!taskForm.sleepTimeInterval.$pristine && taskForm.sleepTimeInterval.$invalid">
                        <span class="glyphicon glyphicon-remove form-control-feedback"></span><label class="control-label">每次处理完休眠时长必须是数字</label>
                    </div>
                </div>
            </div>
            <div class="form-group has-feedback">
                <label for="permitRunStartTime" class="col-sm-4 control-label">执行开始时间</label>
                <div class="col-sm-8">
                    <input type="text" class="form-control"
                           ng-model="modal.permitRunStartTime" name="permitRunStartTime"
                           id="permitRunStartTime" placeholder="执行开始时间">
                </div>
            </div>
            <div class="form-group has-feedback">
                <label for="permitRunEndTime" class="col-sm-4 control-label">执行结束时间</label>
                <div class="col-sm-8">
                    <input type="text" class="form-control"
                           ng-model="modal.permitRunEndTime" name="permitRunEndTime"
                           id="permitRunEndTime" placeholder="执行结束时间">
                </div>
            </div>
            <div class="form-group has-feedback" ng-class="{'has-success' : !taskForm.maxTaskItemsOfOneThreadGroup.$pristine && taskForm.maxTaskItemsOfOneThreadGroup.$valid,
            'has-error' : !taskForm.maxTaskItemsOfOneThreadGroup.$pristine && taskForm.maxTaskItemsOfOneThreadGroup.$invalid}">
                <label for="maxTaskItemsOfOneThreadGroup" class="col-sm-4 control-label">单线程组最大任务项</label>

                <div class="col-sm-8">
                    <input type="number" class="form-control" required ng-maxlength=40
                           ng-model="modal.maxTaskItemsOfOneThreadGroup" name="maxTaskItemsOfOneThreadGroup"
                           id="maxTaskItemsOfOneThreadGroup" placeholder="单线程组最大任务项">

                    <div ng-show="!taskForm.maxTaskItemsOfOneThreadGroup.$pristine && taskForm.maxTaskItemsOfOneThreadGroup.$valid">
                        <span class="glyphicon glyphicon-ok form-control-feedback"></span><label class="control-label">验证通过</label>
                    </div>
                    <div ng-show="!taskForm.maxTaskItemsOfOneThreadGroup.$pristine && taskForm.maxTaskItemsOfOneThreadGroup.$invalid">
                        <span class="glyphicon glyphicon-remove form-control-feedback"></span><label class="control-label">单线程组最大任务项必须是数字</label>
                    </div>
                </div>
            </div>

            <div class="form-group has-feedback">
                <label for="taskParameter" class="col-sm-4 control-label">自定义参数</label>
                <div class="col-sm-8">
                    <input type="text" class="form-control"
                           ng-model="modal.taskParameter" name="taskParameter"
                           id="taskParameter" placeholder="自定义参数">
                </div>
            </div>
            <div class="form-group has-feedback">
                <label for="taskItems" class="col-sm-4 control-label">任务项(","分隔)</label>
                <div class="col-sm-8">
                    <input type="text" class="form-control"
                           ng-model="modal.taskItems" name="taskItems"
                           id="taskItems" placeholder="任务项">
                </div>
            </div>
            <div class="box-footer col-sm-12">
                <button type="button" class="btn btn-default pull-left" data-dismiss="modal" ng-click="cancel()">
                    关闭
                </button>
                <button type="button" ng-disabled="!taskForm.$valid" class="btn pull-right btn-primary" ng-click="ok()">
                    {{modal.btnName}}
                </button>
            </div>
        </div>
    </form>
</div>
